package com.gec.hawaste.controller;
import com.gec.hawaste.entity.WasteType;
import com.gec.hawaste.service.IWasteTypeService;
import com.gec.hawaste.utils.ResultBean;
import com.gec.hawaste.vo.WasteTypeDo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chenxys
 * @since 2022-07-01
 */
@Slf4j
@RestController
@RequestMapping("/manager/wasteType")
public class WasteTypeController {
    @Autowired
    private IWasteTypeService wasteTypeService;

    @GetMapping("/selectAll")
    public ResultBean<WasteType> selectAll(){
        List<WasteType>  wasteTypeList = wasteTypeService.list();
        log.info("查询所有废品类型");
        return ResultBean.ok(wasteTypeList);
    }
}
